<template>
	<view class="login-page">
		<custom-title-bar bgColor="#8cd548" textColor="white"> 用户登录 </custom-title-bar>
		<view class="login-container container m-auto flex-center">
			<view class="avatar">
				<image class="avatar-img" src="/static/images/avatar.jpg" mode="aspectFill"></image>
			</view>
			<view class="login-btn-container">
				<wd-button type="success" custom-class="login-btn">使用微信登录小程序</wd-button>
			</view>
			<view class="user-agreement" style="margin-top: 50rpx;">
				<wd-checkbox v-model="userAgreement" shape="square" />
				我已阅读并同意<text style="text-decoration: underline; color: #3ec1d3; display: inline;">《用户使用协议》</text>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'

	const userAgreement = ref(false)
</script>

<style lang="scss" scoped>
	page {
		background-color: $primary-color;
	}

	.login-container {
		height: 600rpx;
		margin-top: 280rpx;
		flex-direction: column;

		.avatar {
			width: 130rpx;
			height: 130rpx;
			overflow: hidden;
			border-radius: 50%;
			margin-bottom: 60rpx;

			.avatar-img {
				width: 100%;
				height: 100%;
			}
		}

		.user-agreement {
			color: #999;
			display: flex;
			max-width: 80%;
			flex-wrap: wrap;
			font-size: 28rpx;
			text-align: left;
			align-items: center;
		}
	}
</style>